package com.jakeprim.demo;

/**
 * 通过注解加反射实现一个SQL语句 select 字段 表名 from where 条件
 */
@SqlState("t_order")
public class Order {
    @Column //默认和字段名一致
    private Long id;

    @Column("order_no") //Java驼峰命名 SQL _ 命名
    private String orderNo;//一旦有值 作为查询条件

    @Column("user_name")
    private String userName;

    @Column("user_id")
    private int userId;

    @Column("shop_id")
    private int shopId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getShopId() {
        return shopId;
    }

    public void setShopId(int shopId) {
        this.shopId = shopId;
    }
}
